home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / binutils.7 / binutils / binutils-2.7 / gas / doc / as.info-3 < prev    next >
Encoding:
GNU Info File  |  1996-07-15  |  48.9 KB  |  1,451 lines

  1. This is Info file as.info, produced by Makeinfo-1.55 from the input
  2. file ./as.texinfo.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * As: (as).                     The GNU assembler.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    This file documents the GNU Assembler "as".
  9.  
  10.    Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation,
  11. Inc.
  12.  
  13.    Permission is granted to make and distribute verbatim copies of this
  14. manual provided the copyright notice and this permission notice are
  15. preserved on all copies.
  16.  
  17.    Permission is granted to copy and distribute modified versions of
  18. this manual under the conditions for verbatim copying, provided that
  19. the entire resulting derived work is distributed under the terms of a
  20. permission notice identical to this one.
  21.  
  22.    Permission is granted to copy and distribute translations of this
  23. manual into another language, under the above conditions for modified
  24. versions.
  25.  
  26. 
  27. File: as.info,  Node: Psize,  Next: Quad,  Prev: P2align,  Up: Pseudo Ops
  28.  
  29. `.psize LINES , COLUMNS'
  30. ========================
  31.  
  32.    Use this directive to declare the number of lines--and, optionally,
  33. the number of columns--to use for each page, when generating listings.
  34.  
  35.    If you do not use `.psize', listings use a default line-count of 60.
  36. You may omit the comma and COLUMNS specification; the default width is
  37. 200 columns.
  38.  
  39.    `as' generates formfeeds whenever the specified number of lines is
  40. exceeded (or whenever you explicitly request one, using `.eject').
  41.  
  42.    If you specify LINES as `0', no formfeeds are generated save those
  43. explicitly specified with `.eject'.
  44.  
  45. 
  46. File: as.info,  Node: Quad,  Next: Rept,  Prev: Psize,  Up: Pseudo Ops
  47.  
  48. `.quad BIGNUMS'
  49. ===============
  50.  
  51.    `.quad' expects zero or more bignums, separated by commas.  For each
  52. bignum, it emits an 8-byte integer.  If the bignum won't fit in 8
  53. bytes, it prints a warning message; and just takes the lowest order 8
  54. bytes of the bignum.
  55.  
  56.    The term "quad" comes from contexts in which a "word" is two bytes;
  57. hence *quad*-word for 8 bytes.
  58.  
  59. 
  60. File: as.info,  Node: Rept,  Next: Sbttl,  Prev: Quad,  Up: Pseudo Ops
  61.  
  62. `.rept COUNT'
  63. =============
  64.  
  65.    Repeat the sequence of lines between the `.rept' directive and the
  66. next `.endr' directive COUNT times.
  67.  
  68.    For example, assembling
  69.  
  70.              .rept   3
  71.              .long   0
  72.              .endr
  73.  
  74.    is equivalent to assembling
  75.  
  76.              .long   0
  77.              .long   0
  78.              .long   0
  79.  
  80. 
  81. File: as.info,  Node: Sbttl,  Next: Scl,  Prev: Rept,  Up: Pseudo Ops
  82.  
  83. `.sbttl "SUBHEADING"'
  84. =====================
  85.  
  86.    Use SUBHEADING as the title (third line, immediately after the title
  87. line) when generating assembly listings.
  88.  
  89.    This directive affects subsequent pages, as well as the current page
  90. if it appears within ten lines of the top of a page.
  91.  
  92. 
  93. File: as.info,  Node: Scl,  Next: Section,  Prev: Sbttl,  Up: Pseudo Ops
  94.  
  95. `.scl CLASS'
  96. ============
  97.  
  98.    Set the storage-class value for a symbol.  This directive may only be
  99. used inside a `.def'/`.endef' pair.  Storage class may flag whether a
  100. symbol is static or external, or it may record further symbolic
  101. debugging information.
  102.  
  103.    The `.scl' directive is primarily associated with COFF output; when
  104. configured to generate `b.out' output format, `as' accepts this
  105. directive but ignores it.
  106.  
  107. 
  108. File: as.info,  Node: Section,  Next: Set,  Prev: Scl,  Up: Pseudo Ops
  109.  
  110. `.section NAME, SUBSECTION'
  111. ===========================
  112.  
  113.    Assemble the following code into end of subsection numbered
  114. SUBSECTION in the COFF named section NAME.  If you omit SUBSECTION,
  115. `as' uses subsection number zero.  `.section .text' is equivalent to
  116. the `.text' directive; `.section .data' is equivalent to the `.data'
  117. directive.  This directive is only supported for targets that actually
  118. support arbitrarily named sections; on `a.out' targets, for example, it
  119. is not accepted, even with a standard `a.out' section name as its
  120. parameter.
  121.  
  122. 
  123. File: as.info,  Node: Set,  Next: Short,  Prev: Section,  Up: Pseudo Ops
  124.  
  125. `.set SYMBOL, EXPRESSION'
  126. =========================
  127.  
  128.    Set the value of SYMBOL to EXPRESSION.  This changes SYMBOL's value
  129. and type to conform to EXPRESSION.  If SYMBOL was flagged as external,
  130. it remains flagged. (*Note Symbol Attributes::.)
  131.  
  132.    You may `.set' a symbol many times in the same assembly.
  133.  
  134.    If you `.set' a global symbol, the value stored in the object file
  135. is the last value stored into it.
  136.  
  137.    The syntax for `set' on the HPPA is `SYMBOL .set EXPRESSION'.
  138.  
  139. 
  140. File: as.info,  Node: Short,  Next: Single,  Prev: Set,  Up: Pseudo Ops
  141.  
  142. `.short EXPRESSIONS'
  143. ====================
  144.  
  145.    `.short' is normally the same as `.word'.  *Note `.word': Word.
  146.  
  147.    In some configurations, however, `.short' and `.word' generate
  148. numbers of different lengths; *note Machine Dependencies::..
  149.  
  150. 
  151. File: as.info,  Node: Single,  Next: Size,  Prev: Short,  Up: Pseudo Ops
  152.  
  153. `.single FLONUMS'
  154. =================
  155.  
  156.    This directive assembles zero or more flonums, separated by commas.
  157. It has the same effect as `.float'.  The exact kind of floating point
  158. numbers emitted depends on how `as' is configured.  *Note Machine
  159. Dependencies::.
  160.  
  161. 
  162. File: as.info,  Node: Size,  Next: Skip,  Prev: Single,  Up: Pseudo Ops
  163.  
  164. `.size'
  165. =======
  166.  
  167.    This directive is generated by compilers to include auxiliary
  168. debugging information in the symbol table.  It is only permitted inside
  169. `.def'/`.endef' pairs.
  170.  
  171.    `.size' is only meaningful when generating COFF format output; when
  172. `as' is generating `b.out', it accepts this directive but ignores it.
  173.  
  174. 
  175. File: as.info,  Node: Skip,  Next: Space,  Prev: Size,  Up: Pseudo Ops
  176.  
  177. `.skip SIZE , FILL'
  178. ===================
  179.  
  180.    This directive emits SIZE bytes, each of value FILL.  Both SIZE and
  181. FILL are absolute expressions.  If the comma and FILL are omitted, FILL
  182. is assumed to be zero.  This is the same as `.space'.
  183.  
  184. 
  185. File: as.info,  Node: Space,  Next: Stab,  Prev: Skip,  Up: Pseudo Ops
  186.  
  187. `.space SIZE , FILL'
  188. ====================
  189.  
  190.    This directive emits SIZE bytes, each of value FILL.  Both SIZE and
  191. FILL are absolute expressions.  If the comma and FILL are omitted, FILL
  192. is assumed to be zero.  This is the same as `.skip'.
  193.  
  194.      *Warning:* `.space' has a completely different meaning for HPPA
  195.      targets; use `.block' as a substitute.  See `HP9000 Series 800
  196.      Assembly Language Reference Manual' (HP 92432-90001) for the
  197.      meaning of the `.space' directive.  *Note HPPA Assembler
  198.      Directives: HPPA Directives, for a summary.
  199.  
  200.    On the AMD 29K, this directive is ignored; it is accepted for
  201. compatibility with other AMD 29K assemblers.
  202.  
  203.      *Warning:* In most versions of the GNU assembler, the directive
  204.      `.space' has the effect of `.block'  *Note Machine Dependencies::.
  205.  
  206. 
  207. File: as.info,  Node: Stab,  Next: String,  Prev: Space,  Up: Pseudo Ops
  208.  
  209. `.stabd, .stabn, .stabs'
  210. ========================
  211.  
  212.    There are three directives that begin `.stab'.  All emit symbols
  213. (*note Symbols::.), for use by symbolic debuggers.  The symbols are not
  214. entered in the `as' hash table: they cannot be referenced elsewhere in
  215. the source file.  Up to five fields are required:
  216.  
  217. STRING
  218.      This is the symbol's name.  It may contain any character except
  219.      `\000', so is more general than ordinary symbol names.  Some
  220.      debuggers used to code arbitrarily complex structures into symbol
  221.      names using this field.
  222.  
  223. TYPE
  224.      An absolute expression.  The symbol's type is set to the low 8
  225.      bits of this expression.  Any bit pattern is permitted, but `ld'
  226.      and debuggers choke on silly bit patterns.
  227.  
  228. OTHER
  229.      An absolute expression.  The symbol's "other" attribute is set to
  230.      the low 8 bits of this expression.
  231.  
  232. DESC
  233.      An absolute expression.  The symbol's descriptor is set to the low
  234.      16 bits of this expression.
  235.  
  236. VALUE
  237.      An absolute expression which becomes the symbol's value.
  238.  
  239.    If a warning is detected while reading a `.stabd', `.stabn', or
  240. `.stabs' statement, the symbol has probably already been created; you
  241. get a half-formed symbol in your object file.  This is compatible with
  242. earlier assemblers!
  243.  
  244. `.stabd TYPE , OTHER , DESC'
  245.      The "name" of the symbol generated is not even an empty string.
  246.      It is a null pointer, for compatibility.  Older assemblers used a
  247.      null pointer so they didn't waste space in object files with empty
  248.      strings.
  249.  
  250.      The symbol's value is set to the location counter, relocatably.
  251.      When your program is linked, the value of this symbol is the
  252.      address of the location counter when the `.stabd' was assembled.
  253.  
  254. `.stabn TYPE , OTHER , DESC , VALUE'
  255.      The name of the symbol is set to the empty string `""'.
  256.  
  257. `.stabs STRING ,  TYPE , OTHER , DESC , VALUE'
  258.      All five fields are specified.
  259.  
  260. 
  261. File: as.info,  Node: String,  Next: Tag,  Prev: Stab,  Up: Pseudo Ops
  262.  
  263. `.string' "STR"
  264. ===============
  265.  
  266.    Copy the characters in STR to the object file.  You may specify more
  267. than one string to copy, separated by commas.  Unless otherwise
  268. specified for a particular machine, the assembler marks the end of each
  269. string with a 0 byte.  You can use any of the escape sequences
  270. described in *Note Strings: Strings.
  271.  
  272. 
  273. File: as.info,  Node: Tag,  Next: Text,  Prev: String,  Up: Pseudo Ops
  274.  
  275. `.tag STRUCTNAME'
  276. =================
  277.  
  278.    This directive is generated by compilers to include auxiliary
  279. debugging information in the symbol table.  It is only permitted inside
  280. `.def'/`.endef' pairs.  Tags are used to link structure definitions in
  281. the symbol table with instances of those structures.
  282.  
  283.    `.tag' is only used when generating COFF format output; when `as' is
  284. generating `b.out', it accepts this directive but ignores it.
  285.  
  286. 
  287. File: as.info,  Node: Text,  Next: Title,  Prev: Tag,  Up: Pseudo Ops
  288.  
  289. `.text SUBSECTION'
  290. ==================
  291.  
  292.    Tells `as' to assemble the following statements onto the end of the
  293. text subsection numbered SUBSECTION, which is an absolute expression.
  294. If SUBSECTION is omitted, subsection number zero is used.
  295.  
  296. 
  297. File: as.info,  Node: Title,  Next: Type,  Prev: Text,  Up: Pseudo Ops
  298.  
  299. `.title "HEADING"'
  300. ==================
  301.  
  302.    Use HEADING as the title (second line, immediately after the source
  303. file name and pagenumber) when generating assembly listings.
  304.  
  305.    This directive affects subsequent pages, as well as the current page
  306. if it appears within ten lines of the top of a page.
  307.  
  308. 
  309. File: as.info,  Node: Type,  Next: Val,  Prev: Title,  Up: Pseudo Ops
  310.  
  311. `.type INT'
  312. ===========
  313.  
  314.    This directive, permitted only within `.def'/`.endef' pairs, records
  315. the integer INT as the type attribute of a symbol table entry.
  316.  
  317.    `.type' is associated only with COFF format output; when `as' is
  318. configured for `b.out' output, it accepts this directive but ignores it.
  319.  
  320. 
  321. File: as.info,  Node: Val,  Next: Word,  Prev: Type,  Up: Pseudo Ops
  322.  
  323. `.val ADDR'
  324. ===========
  325.  
  326.    This directive, permitted only within `.def'/`.endef' pairs, records
  327. the address ADDR as the value attribute of a symbol table entry.
  328.  
  329.    `.val' is used only for COFF output; when `as' is configured for
  330. `b.out', it accepts this directive but ignores it.
  331.  
  332. 
  333. File: as.info,  Node: Word,  Next: Deprecated,  Prev: Val,  Up: Pseudo Ops
  334.  
  335. `.word EXPRESSIONS'
  336. ===================
  337.  
  338.    This directive expects zero or more EXPRESSIONS, of any section,
  339. separated by commas.
  340.  
  341.    The size of the number emitted, and its byte order, depend on what
  342. target computer the assembly is for.
  343.  
  344.      *Warning: Special Treatment to support Compilers*
  345.  
  346.    Machines with a 32-bit address space, but that do less than 32-bit
  347. addressing, require the following special treatment.  If the machine of
  348. interest to you does 32-bit addressing (or doesn't require it; *note
  349. Machine Dependencies::.), you can ignore this issue.
  350.  
  351.    In order to assemble compiler output into something that works, `as'
  352. occasionlly does strange things to `.word' directives.  Directives of
  353. the form `.word sym1-sym2' are often emitted by compilers as part of
  354. jump tables.  Therefore, when `as' assembles a directive of the form
  355. `.word sym1-sym2', and the difference between `sym1' and `sym2' does
  356. not fit in 16 bits, `as' creates a "secondary jump table", immediately
  357. before the next label.  This secondary jump table is preceded by a
  358. short-jump to the first byte after the secondary table.  This
  359. short-jump prevents the flow of control from accidentally falling into
  360. the new table.  Inside the table is a long-jump to `sym2'.  The
  361. original `.word' contains `sym1' minus the address of the long-jump to
  362. `sym2'.
  363.  
  364.    If there were several occurrences of `.word sym1-sym2' before the
  365. secondary jump table, all of them are adjusted.  If there was a `.word
  366. sym3-sym4', that also did not fit in sixteen bits, a long-jump to
  367. `sym4' is included in the secondary jump table, and the `.word'
  368. directives are adjusted to contain `sym3' minus the address of the
  369. long-jump to `sym4'; and so on, for as many entries in the original
  370. jump table as necessary.
  371.  
  372. 
  373. File: as.info,  Node: Deprecated,  Prev: Word,  Up: Pseudo Ops
  374.  
  375. Deprecated Directives
  376. =====================
  377.  
  378.    One day these directives won't work.  They are included for
  379. compatibility with older assemblers.
  380. .abort
  381. .app-file
  382. .line
  383. 
  384. File: as.info,  Node: Machine Dependencies,  Next: Acknowledgements,  Prev: Pseudo Ops,  Up: Top
  385.  
  386. Machine Dependent Features
  387. **************************
  388.  
  389.    The machine instruction sets are (almost by definition) different on
  390. each machine where `as' runs.  Floating point representations vary as
  391. well, and `as' often supports a few additional directives or
  392. command-line options for compatibility with other assemblers on a
  393. particular platform.  Finally, some versions of `as' support special
  394. pseudo-instructions for branch optimization.
  395.  
  396.    This chapter discusses most of these differences, though it does not
  397. include details on any machine's instruction set.  For details on that
  398. subject, see the hardware manufacturer's manual.
  399.  
  400. * Menu:
  401.  
  402.  
  403. * AMD29K-Dependent::            AMD 29K Dependent Features
  404.  
  405. * H8/300-Dependent::            Hitachi H8/300 Dependent Features
  406.  
  407. * H8/500-Dependent::            Hitachi H8/500 Dependent Features
  408.  
  409. * HPPA-Dependent::              HPPA Dependent Features
  410.  
  411. * i386-Dependent::              Intel 80386 Dependent Features
  412.  
  413. * i960-Dependent::              Intel 80960 Dependent Features
  414.  
  415. * M68K-Dependent::              M680x0 Dependent Features
  416.  
  417. * MIPS-Dependent::              MIPS Dependent Features
  418.  
  419. * SH-Dependent::                Hitachi SH Dependent Features
  420.  
  421. * Sparc-Dependent::             SPARC Dependent Features
  422.  
  423. * Z8000-Dependent::             Z8000 Dependent Features
  424.  
  425. * Vax-Dependent::               VAX Dependent Features
  426.  
  427. 
  428. File: as.info,  Node: AMD29K-Dependent,  Next: H8/300-Dependent,  Up: Machine Dependencies
  429.  
  430. AMD 29K Dependent Features
  431. ==========================
  432.  
  433. * Menu:
  434.  
  435. * AMD29K Options::              Options
  436. * AMD29K Syntax::               Syntax
  437. * AMD29K Floating Point::       Floating Point
  438. * AMD29K Directives::           AMD 29K Machine Directives
  439. * AMD29K Opcodes::              Opcodes
  440.  
  441. 
  442. File: as.info,  Node: AMD29K Options,  Next: AMD29K Syntax,  Up: AMD29K-Dependent
  443.  
  444. Options
  445. -------
  446.  
  447.    `as' has no additional command-line options for the AMD 29K family.
  448.  
  449. 
  450. File: as.info,  Node: AMD29K Syntax,  Next: AMD29K Floating Point,  Prev: AMD29K Options,  Up: AMD29K-Dependent
  451.  
  452. Syntax
  453. ------
  454.  
  455. * Menu:
  456.  
  457. * AMD29K-Macros::        Macros
  458. * AMD29K-Chars::                Special Characters
  459. * AMD29K-Regs::                 Register Names
  460.  
  461. 
  462. File: as.info,  Node: AMD29K-Macros,  Next: AMD29K-Chars,  Up: AMD29K Syntax
  463.  
  464. Macros
  465. ......
  466.  
  467.    The macro syntax used on the AMD 29K is like that described in the
  468. AMD 29K Family Macro Assembler Specification.  Normal `as' macros
  469. should still work.
  470.  
  471. 
  472. File: as.info,  Node: AMD29K-Chars,  Next: AMD29K-Regs,  Prev: AMD29K-Macros,  Up: AMD29K Syntax
  473.  
  474. Special Characters
  475. ..................
  476.  
  477.    `;' is the line comment character.
  478.  
  479.    The character `?' is permitted in identifiers (but may not begin an
  480. identifier).
  481.  
  482. 
  483. File: as.info,  Node: AMD29K-Regs,  Prev: AMD29K-Chars,  Up: AMD29K Syntax
  484.  
  485. Register Names
  486. ..............
  487.  
  488.    General-purpose registers are represented by predefined symbols of
  489. the form `GRNNN' (for global registers) or `LRNNN' (for local
  490. registers), where NNN represents a number between `0' and `127',
  491. written with no leading zeros.  The leading letters may be in either
  492. upper or lower case; for example, `gr13' and `LR7' are both valid
  493. register names.
  494.  
  495.    You may also refer to general-purpose registers by specifying the
  496. register number as the result of an expression (prefixed with `%%' to
  497. flag the expression as a register number):
  498.      %%EXPRESSION
  499.  
  500. --where EXPRESSION must be an absolute expression evaluating to a
  501. number between `0' and `255'.  The range [0, 127] refers to global
  502. registers, and the range [128, 255] to local registers.
  503.  
  504.    In addition, `as' understands the following protected
  505. special-purpose register names for the AMD 29K family:
  506.  
  507.        vab    chd    pc0
  508.        ops    chc    pc1
  509.        cps    rbp    pc2
  510.        cfg    tmc    mmu
  511.        cha    tmr    lru
  512.  
  513.    These unprotected special-purpose register names are also recognized:
  514.        ipc    alu    fpe
  515.        ipa    bp     inte
  516.        ipb    fc     fps
  517.        q      cr     exop
  518.  
  519. 
  520. File: as.info,  Node: AMD29K Floating Point,  Next: AMD29K Directives,  Prev: AMD29K Syntax,  Up: AMD29K-Dependent
  521.  
  522. Floating Point
  523. --------------
  524.  
  525.    The AMD 29K family uses IEEE floating-point numbers.
  526.  
  527. 
  528. File: as.info,  Node: AMD29K Directives,  Next: AMD29K Opcodes,  Prev: AMD29K Floating Point,  Up: AMD29K-Dependent
  529.  
  530. AMD 29K Machine Directives
  531. --------------------------
  532.  
  533. `.block SIZE , FILL'
  534.      This directive emits SIZE bytes, each of value FILL.  Both SIZE
  535.      and FILL are absolute expressions.  If the comma and FILL are
  536.      omitted, FILL is assumed to be zero.
  537.  
  538.      In other versions of the GNU assembler, this directive is called
  539.      `.space'.
  540.  
  541. `.cputype'
  542.      This directive is ignored; it is accepted for compatibility with
  543.      other AMD 29K assemblers.
  544.  
  545. `.file'
  546.      This directive is ignored; it is accepted for compatibility with
  547.      other AMD 29K assemblers.
  548.  
  549.           *Warning:* in other versions of the GNU assembler, `.file' is
  550.           used for the directive called `.app-file' in the AMD 29K
  551.           support.
  552.  
  553. `.line'
  554.      This directive is ignored; it is accepted for compatibility with
  555.      other AMD 29K assemblers.
  556.  
  557. `.sect'
  558.      This directive is ignored; it is accepted for compatibility with
  559.      other AMD 29K assemblers.
  560.  
  561. `.use SECTION NAME'
  562.      Establishes the section and subsection for the following code;
  563.      SECTION NAME may be one of `.text', `.data', `.data1', or `.lit'.
  564.      With one of the first three SECTION NAME options, `.use' is
  565.      equivalent to the machine directive SECTION NAME; the remaining
  566.      case, `.use .lit', is the same as `.data 200'.
  567.  
  568. 
  569. File: as.info,  Node: AMD29K Opcodes,  Prev: AMD29K Directives,  Up: AMD29K-Dependent
  570.  
  571. Opcodes
  572. -------
  573.  
  574.    `as' implements all the standard AMD 29K opcodes.  No additional
  575. pseudo-instructions are needed on this family.
  576.  
  577.    For information on the 29K machine instruction set, see `Am29000
  578. User's Manual', Advanced Micro Devices, Inc.
  579.  
  580. 
  581. File: as.info,  Node: H8/300-Dependent,  Next: H8/500-Dependent,  Prev: AMD29K-Dependent,  Up: Machine Dependencies
  582.  
  583. H8/300 Dependent Features
  584. =========================
  585.  
  586. * Menu:
  587.  
  588. * H8/300 Options::              Options
  589. * H8/300 Syntax::               Syntax
  590. * H8/300 Floating Point::       Floating Point
  591. * H8/300 Directives::           H8/300 Machine Directives
  592. * H8/300 Opcodes::              Opcodes
  593.  
  594. 
  595. File: as.info,  Node: H8/300 Options,  Next: H8/300 Syntax,  Up: H8/300-Dependent
  596.  
  597. Options
  598. -------
  599.  
  600.    `as' has no additional command-line options for the Hitachi H8/300
  601. family.
  602.  
  603. 
  604. File: as.info,  Node: H8/300 Syntax,  Next: H8/300 Floating Point,  Prev: H8/300 Options,  Up: H8/300-Dependent
  605.  
  606. Syntax
  607. ------
  608.  
  609. * Menu:
  610.  
  611. * H8/300-Chars::                Special Characters
  612. * H8/300-Regs::                 Register Names
  613. * H8/300-Addressing::           Addressing Modes
  614.  
  615. 
  616. File: as.info,  Node: H8/300-Chars,  Next: H8/300-Regs,  Up: H8/300 Syntax
  617.  
  618. Special Characters
  619. ..................
  620.  
  621.    `;' is the line comment character.
  622.  
  623.    `$' can be used instead of a newline to separate statements.
  624. Therefore *you may not use `$' in symbol names* on the H8/300.
  625.  
  626. 
  627. File: as.info,  Node: H8/300-Regs,  Next: H8/300-Addressing,  Prev: H8/300-Chars,  Up: H8/300 Syntax
  628.  
  629. Register Names
  630. ..............
  631.  
  632.    You can use predefined symbols of the form `rNh' and `rNl' to refer
  633. to the H8/300 registers as sixteen 8-bit general-purpose registers.  N
  634. is a digit from `0' to `7'); for instance, both `r0h' and `r7l' are
  635. valid register names.
  636.  
  637.    You can also use the eight predefined symbols `rN' to refer to the
  638. H8/300 registers as 16-bit registers (you must use this form for
  639. addressing).
  640.  
  641.    On the H8/300H, you can also use the eight predefined symbols `erN'
  642. (`er0' ... `er7') to refer to the 32-bit general purpose registers.
  643.  
  644.    The two control registers are called `pc' (program counter; a 16-bit
  645. register, except on the H8/300H where it is 24 bits) and `ccr'
  646. (condition code register; an 8-bit register).  `r7' is used as the
  647. stack pointer, and can also be called `sp'.
  648.  
  649. 
  650. File: as.info,  Node: H8/300-Addressing,  Prev: H8/300-Regs,  Up: H8/300 Syntax
  651.  
  652. Addressing Modes
  653. ................
  654.  
  655.    as understands the following addressing modes for the H8/300:
  656. `rN'
  657.      Register direct
  658.  
  659. `@rN'
  660.      Register indirect
  661.  
  662. `@(D, rN)'
  663. `@(D:16, rN)'
  664. `@(D:24, rN)'
  665.      Register indirect: 16-bit or 24-bit displacement D from register
  666.      N.  (24-bit displacements are only meaningful on the H8/300H.)
  667.  
  668. `@rN+'
  669.      Register indirect with post-increment
  670.  
  671. `@-rN'
  672.      Register indirect with pre-decrement
  673.  
  674. ``@'AA'
  675. ``@'AA:8'
  676. ``@'AA:16'
  677. ``@'AA:24'
  678.      Absolute address `aa'.  (The address size `:24' only makes sense
  679.      on the H8/300H.)
  680.  
  681. `#XX'
  682. `#XX:8'
  683. `#XX:16'
  684. `#XX:32'
  685.      Immediate data XX.  You may specify the `:8', `:16', or `:32' for
  686.      clarity, if you wish; but `as' neither requires this nor uses
  687.      it--the data size required is taken from context.
  688.  
  689. ``@'`@'AA'
  690. ``@'`@'AA:8'
  691.      Memory indirect.  You may specify the `:8' for clarity, if you
  692.      wish; but `as' neither requires this nor uses it.
  693.  
  694. 
  695. File: as.info,  Node: H8/300 Floating Point,  Next: H8/300 Directives,  Prev: H8/300 Syntax,  Up: H8/300-Dependent
  696.  
  697. Floating Point
  698. --------------
  699.  
  700.    The H8/300 family has no hardware floating point, but the `.float'
  701. directive generates IEEE floating-point numbers for compatibility with
  702. other development tools.
  703.  
  704. 
  705. File: as.info,  Node: H8/300 Directives,  Next: H8/300 Opcodes,  Prev: H8/300 Floating Point,  Up: H8/300-Dependent
  706.  
  707. H8/300 Machine Directives
  708. -------------------------
  709.  
  710.    `as' has only one machine-dependent directive for the H8/300:
  711.  
  712. `.h8300h'
  713.      Recognize and emit additional instructions for the H8/300H
  714.      variant, and also make `.int' emit 32-bit numbers rather than the
  715.      usual (16-bit) for the H8/300 family.
  716.  
  717.    On the H8/300 family (including the H8/300H) `.word' directives
  718. generate 16-bit numbers.
  719.  
  720. 
  721. File: as.info,  Node: H8/300 Opcodes,  Prev: H8/300 Directives,  Up: H8/300-Dependent
  722.  
  723. Opcodes
  724. -------
  725.  
  726.    For detailed information on the H8/300 machine instruction set, see
  727. `H8/300 Series Programming Manual' (Hitachi ADE-602-025).  For
  728. information specific to the H8/300H, see `H8/300H Series Programming
  729. Manual' (Hitachi).
  730.  
  731.    `as' implements all the standard H8/300 opcodes.  No additional
  732. pseudo-instructions are needed on this family.
  733.  
  734.    The following table summarizes the H8/300 opcodes, and their
  735. arguments.  Entries marked `*' are opcodes used only on the H8/300H.
  736.  
  737.               Legend:
  738.                  Rs   source register
  739.                  Rd   destination register
  740.                  abs  absolute address
  741.                  imm  immediate data
  742.               disp:N  N-bit displacement from a register
  743.              pcrel:N  N-bit displacement relative to program counter
  744.      
  745.         add.b #imm,rd              *  andc #imm,ccr
  746.         add.b rs,rd                   band #imm,rd
  747.         add.w rs,rd                   band #imm,@rd
  748.      *  add.w #imm,rd                 band #imm,@abs:8
  749.      *  add.l rs,rd                   bra  pcrel:8
  750.      *  add.l #imm,rd              *  bra  pcrel:16
  751.         adds #imm,rd                  bt   pcrel:8
  752.         addx #imm,rd               *  bt   pcrel:16
  753.         addx rs,rd                    brn  pcrel:8
  754.         and.b #imm,rd              *  brn  pcrel:16
  755.         and.b rs,rd                   bf   pcrel:8
  756.      *  and.w rs,rd                *  bf   pcrel:16
  757.      *  and.w #imm,rd                 bhi  pcrel:8
  758.      *  and.l #imm,rd              *  bhi  pcrel:16
  759.      *  and.l rs,rd                   bls  pcrel:8
  760.      
  761.      *  bls  pcrel:16                 bld  #imm,rd
  762.         bcc  pcrel:8                  bld  #imm,@rd
  763.      *  bcc  pcrel:16                 bld  #imm,@abs:8
  764.         bhs  pcrel:8                  bnot #imm,rd
  765.      *  bhs  pcrel:16                 bnot #imm,@rd
  766.         bcs  pcrel:8                  bnot #imm,@abs:8
  767.      *  bcs  pcrel:16                 bnot rs,rd
  768.         blo  pcrel:8                  bnot rs,@rd
  769.      *  blo  pcrel:16                 bnot rs,@abs:8
  770.         bne  pcrel:8                  bor  #imm,rd
  771.      *  bne  pcrel:16                 bor  #imm,@rd
  772.         beq  pcrel:8                  bor  #imm,@abs:8
  773.      *  beq  pcrel:16                 bset #imm,rd
  774.         bvc  pcrel:8                  bset #imm,@rd
  775.      *  bvc  pcrel:16                 bset #imm,@abs:8
  776.         bvs  pcrel:8                  bset rs,rd
  777.      *  bvs  pcrel:16                 bset rs,@rd
  778.         bpl  pcrel:8                  bset rs,@abs:8
  779.      *  bpl  pcrel:16                 bsr  pcrel:8
  780.         bmi  pcrel:8                  bsr  pcrel:16
  781.      *  bmi  pcrel:16                 bst  #imm,rd
  782.         bge  pcrel:8                  bst  #imm,@rd
  783.      *  bge  pcrel:16                 bst  #imm,@abs:8
  784.         blt  pcrel:8                  btst #imm,rd
  785.      *  blt  pcrel:16                 btst #imm,@rd
  786.         bgt  pcrel:8                  btst #imm,@abs:8
  787.      *  bgt  pcrel:16                 btst rs,rd
  788.         ble  pcrel:8                  btst rs,@rd
  789.      *  ble  pcrel:16                 btst rs,@abs:8
  790.         bclr #imm,rd                  bxor #imm,rd
  791.         bclr #imm,@rd                 bxor #imm,@rd
  792.         bclr #imm,@abs:8              bxor #imm,@abs:8
  793.         bclr rs,rd                    cmp.b #imm,rd
  794.         bclr rs,@rd                   cmp.b rs,rd
  795.         bclr rs,@abs:8                cmp.w rs,rd
  796.         biand #imm,rd                 cmp.w rs,rd
  797.         biand #imm,@rd             *  cmp.w #imm,rd
  798.         biand #imm,@abs:8          *  cmp.l #imm,rd
  799.         bild #imm,rd               *  cmp.l rs,rd
  800.         bild #imm,@rd                 daa  rs
  801.         bild #imm,@abs:8              das  rs
  802.         bior #imm,rd                  dec.b rs
  803.         bior #imm,@rd              *  dec.w #imm,rd
  804.         bior #imm,@abs:8           *  dec.l #imm,rd
  805.         bist #imm,rd                  divxu.b rs,rd
  806.         bist #imm,@rd              *  divxu.w rs,rd
  807.         bist #imm,@abs:8           *  divxs.b rs,rd
  808.         bixor #imm,rd              *  divxs.w rs,rd
  809.         bixor #imm,@rd                eepmov
  810.         bixor #imm,@abs:8          *  eepmovw
  811.      
  812.      *  exts.w rd                     mov.w rs,@abs:16
  813.      *  exts.l rd                  *  mov.l #imm,rd
  814.      *  extu.w rd                  *  mov.l rs,rd
  815.      *  extu.l rd                  *  mov.l @rs,rd
  816.         inc  rs                    *  mov.l @(disp:16,rs),rd
  817.      *  inc.w #imm,rd              *  mov.l @(disp:24,rs),rd
  818.      *  inc.l #imm,rd              *  mov.l @rs+,rd
  819.         jmp  @rs                   *  mov.l @abs:16,rd
  820.         jmp  abs                   *  mov.l @abs:24,rd
  821.         jmp  @@abs:8               *  mov.l rs,@rd
  822.         jsr  @rs                   *  mov.l rs,@(disp:16,rd)
  823.         jsr  abs                   *  mov.l rs,@(disp:24,rd)
  824.         jsr  @@abs:8               *  mov.l rs,@-rd
  825.         ldc  #imm,ccr              *  mov.l rs,@abs:16
  826.         ldc  rs,ccr                *  mov.l rs,@abs:24
  827.      *  ldc  @abs:16,ccr              movfpe @abs:16,rd
  828.      *  ldc  @abs:24,ccr              movtpe rs,@abs:16
  829.      *  ldc  @(disp:16,rs),ccr        mulxu.b rs,rd
  830.      *  ldc  @(disp:24,rs),ccr     *  mulxu.w rs,rd
  831.      *  ldc  @rs+,ccr              *  mulxs.b rs,rd
  832.      *  ldc  @rs,ccr               *  mulxs.w rs,rd
  833.      *  mov.b @(disp:24,rs),rd        neg.b rs
  834.      *  mov.b rs,@(disp:24,rd)     *  neg.w rs
  835.         mov.b @abs:16,rd           *  neg.l rs
  836.         mov.b rs,rd                   nop
  837.         mov.b @abs:8,rd               not.b rs
  838.         mov.b rs,@abs:8            *  not.w rs
  839.         mov.b rs,rd                *  not.l rs
  840.         mov.b #imm,rd                 or.b #imm,rd
  841.         mov.b @rs,rd                  or.b rs,rd
  842.         mov.b @(disp:16,rs),rd     *  or.w #imm,rd
  843.         mov.b @rs+,rd              *  or.w rs,rd
  844.         mov.b @abs:8,rd            *  or.l #imm,rd
  845.         mov.b rs,@rd               *  or.l rs,rd
  846.         mov.b rs,@(disp:16,rd)        orc  #imm,ccr
  847.         mov.b rs,@-rd                 pop.w rs
  848.         mov.b rs,@abs:8            *  pop.l rs
  849.         mov.w rs,@rd                  push.w rs
  850.      *  mov.w @(disp:24,rs),rd     *  push.l rs
  851.      *  mov.w rs,@(disp:24,rd)        rotl.b rs
  852.      *  mov.w @abs:24,rd           *  rotl.w rs
  853.      *  mov.w rs,@abs:24           *  rotl.l rs
  854.         mov.w rs,rd                   rotr.b rs
  855.         mov.w #imm,rd              *  rotr.w rs
  856.         mov.w @rs,rd               *  rotr.l rs
  857.         mov.w @(disp:16,rs),rd        rotxl.b rs
  858.         mov.w @rs+,rd              *  rotxl.w rs
  859.         mov.w @abs:16,rd           *  rotxl.l rs
  860.         mov.w rs,@(disp:16,rd)        rotxr.b rs
  861.         mov.w rs,@-rd              *  rotxr.w rs
  862.      
  863.      *  rotxr.l rs                 *  stc  ccr,@(disp:24,rd)
  864.         bpt                        *  stc  ccr,@-rd
  865.         rte                        *  stc  ccr,@abs:16
  866.         rts                        *  stc  ccr,@abs:24
  867.         shal.b rs                     sub.b rs,rd
  868.      *  shal.w rs                     sub.w rs,rd
  869.      *  shal.l rs                  *  sub.w #imm,rd
  870.         shar.b rs                  *  sub.l rs,rd
  871.      *  shar.w rs                  *  sub.l #imm,rd
  872.      *  shar.l rs                     subs #imm,rd
  873.         shll.b rs                     subx #imm,rd
  874.      *  shll.w rs                     subx rs,rd
  875.      *  shll.l rs                  *  trapa #imm
  876.         shlr.b rs                     xor  #imm,rd
  877.      *  shlr.w rs                     xor  rs,rd
  878.      *  shlr.l rs                  *  xor.w #imm,rd
  879.         sleep                      *  xor.w rs,rd
  880.         stc  ccr,rd                *  xor.l #imm,rd
  881.      *  stc  ccr,@rs               *  xor.l rs,rd
  882.      *  stc  ccr,@(disp:16,rd)        xorc #imm,ccr
  883.  
  884.    Four H8/300 instructions (`add', `cmp', `mov', `sub') are defined
  885. with variants using the suffixes `.b', `.w', and `.l' to specify the
  886. size of a memory operand.  `as' supports these suffixes, but does not
  887. require them; since one of the operands is always a register, `as' can
  888. deduce the correct size.
  889.  
  890.    For example, since `r0' refers to a 16-bit register,
  891.      mov    r0,@foo
  892. is equivalent to
  893.      mov.w  r0,@foo
  894.  
  895.    If you use the size suffixes, `as' issues a warning when the suffix
  896. and the register size do not match.
  897.  
  898. 
  899. File: as.info,  Node: H8/500-Dependent,  Next: HPPA-Dependent,  Prev: H8/300-Dependent,  Up: Machine Dependencies
  900.  
  901. H8/500 Dependent Features
  902. =========================
  903.  
  904. * Menu:
  905.  
  906. * H8/500 Options::              Options
  907. * H8/500 Syntax::               Syntax
  908. * H8/500 Floating Point::       Floating Point
  909. * H8/500 Directives::           H8/500 Machine Directives
  910. * H8/500 Opcodes::              Opcodes
  911.  
  912. 
  913. File: as.info,  Node: H8/500 Options,  Next: H8/500 Syntax,  Up: H8/500-Dependent
  914.  
  915. Options
  916. -------
  917.  
  918.    `as' has no additional command-line options for the Hitachi H8/500
  919. family.
  920.  
  921. 
  922. File: as.info,  Node: H8/500 Syntax,  Next: H8/500 Floating Point,  Prev: H8/500 Options,  Up: H8/500-Dependent
  923.  
  924. Syntax
  925. ------
  926.  
  927. * Menu:
  928.  
  929. * H8/500-Chars::                Special Characters
  930. * H8/500-Regs::                 Register Names
  931. * H8/500-Addressing::           Addressing Modes
  932.  
  933. 
  934. File: as.info,  Node: H8/500-Chars,  Next: H8/500-Regs,  Up: H8/500 Syntax
  935.  
  936. Special Characters
  937. ..................
  938.  
  939.    `!' is the line comment character.
  940.  
  941.    `;' can be used instead of a newline to separate statements.
  942.  
  943.    Since `$' has no special meaning, you may use it in symbol names.
  944.  
  945. 
  946. File: as.info,  Node: H8/500-Regs,  Next: H8/500-Addressing,  Prev: H8/500-Chars,  Up: H8/500 Syntax
  947.  
  948. Register Names
  949. ..............
  950.  
  951.    You can use the predefined symbols `r0', `r1', `r2', `r3', `r4',
  952. `r5', `r6', and `r7' to refer to the H8/500 registers.
  953.  
  954.    The H8/500 also has these control registers:
  955.  
  956. `cp'
  957.      code pointer
  958.  
  959. `dp'
  960.      data pointer
  961.  
  962. `bp'
  963.      base pointer
  964.  
  965. `tp'
  966.      stack top pointer
  967.  
  968. `ep'
  969.      extra pointer
  970.  
  971. `sr'
  972.      status register
  973.  
  974. `ccr'
  975.      condition code register
  976.  
  977.    All registers are 16 bits long.  To represent 32 bit numbers, use two
  978. adjacent registers; for distant memory addresses, use one of the segment
  979. pointers (`cp' for the program counter; `dp' for `r0'-`r3'; `ep' for
  980. `r4' and `r5'; and `tp' for `r6' and `r7'.
  981.  
  982. 
  983. File: as.info,  Node: H8/500-Addressing,  Prev: H8/500-Regs,  Up: H8/500 Syntax
  984.  
  985. Addressing Modes
  986. ................
  987.  
  988.    as understands the following addressing modes for the H8/500:
  989. `RN'
  990.      Register direct
  991.  
  992. `@RN'
  993.      Register indirect
  994.  
  995. `@(d:8, RN)'
  996.      Register indirect with 8 bit signed displacement
  997.  
  998. `@(d:16, RN)'
  999.      Register indirect with 16 bit signed displacement
  1000.  
  1001. `@-RN'
  1002.      Register indirect with pre-decrement
  1003.  
  1004. `@RN+'
  1005.      Register indirect with post-increment
  1006.  
  1007. `@AA:8'
  1008.      8 bit absolute address
  1009.  
  1010. `@AA:16'
  1011.      16 bit absolute address
  1012.  
  1013. `#XX:8'
  1014.      8 bit immediate
  1015.  
  1016. `#XX:16'
  1017.      16 bit immediate
  1018.  
  1019. 
  1020. File: as.info,  Node: H8/500 Floating Point,  Next: H8/500 Directives,  Prev: H8/500 Syntax,  Up: H8/500-Dependent
  1021.  
  1022. Floating Point
  1023. --------------
  1024.  
  1025.    The H8/500 family has no hardware floating point, but the `.float'
  1026. directive generates IEEE floating-point numbers for compatibility with
  1027. other development tools.
  1028.  
  1029. 
  1030. File: as.info,  Node: H8/500 Directives,  Next: H8/500 Opcodes,  Prev: H8/500 Floating Point,  Up: H8/500-Dependent
  1031.  
  1032. H8/500 Machine Directives
  1033. -------------------------
  1034.  
  1035.    `as' has no machine-dependent directives for the H8/500.  However,
  1036. on this platform the `.int' and `.word' directives generate 16-bit
  1037. numbers.
  1038.  
  1039. 
  1040. File: as.info,  Node: H8/500 Opcodes,  Prev: H8/500 Directives,  Up: H8/500-Dependent
  1041.  
  1042. Opcodes
  1043. -------
  1044.  
  1045.    For detailed information on the H8/500 machine instruction set, see
  1046. `H8/500 Series Programming Manual' (Hitachi M21T001).
  1047.  
  1048.    `as' implements all the standard H8/500 opcodes.  No additional
  1049. pseudo-instructions are needed on this family.
  1050.  
  1051.    The following table summarizes H8/500 opcodes and their operands:
  1052.  
  1053.      Legend:
  1054.      abs8      8-bit absolute address
  1055.      abs16     16-bit absolute address
  1056.      abs24     24-bit absolute address
  1057.      crb       `ccr', `br', `ep', `dp', `tp', `dp'
  1058.      disp8     8-bit displacement
  1059.      ea        `rn', `@rn', `@(d:8, rn)', `@(d:16, rn)',
  1060.                `@-rn', `@rn+', `@aa:8', `@aa:16',
  1061.                `#xx:8', `#xx:16'
  1062.      ea_mem    `@rn', `@(d:8, rn)', `@(d:16, rn)',
  1063.                `@-rn', `@rn+', `@aa:8', `@aa:16'
  1064.      ea_noimm  `rn', `@rn', `@(d:8, rn)', `@(d:16, rn)',
  1065.                `@-rn', `@rn+', `@aa:8', `@aa:16'
  1066.      fp        r6
  1067.      imm4      4-bit immediate data
  1068.      imm8      8-bit immediate data
  1069.      imm16     16-bit immediate data
  1070.      pcrel8    8-bit offset from program counter
  1071.      pcrel16   16-bit offset from program counter
  1072.      qim       `-2', `-1', `1', `2'
  1073.      rd        any register
  1074.      rs        a register distinct from rd
  1075.      rlist     comma-separated list of registers in parentheses;
  1076.                register ranges `rd-rs' are allowed
  1077.      sp        stack pointer (`r7')
  1078.      sr        status register
  1079.      sz        size; `.b' or `.w'.  If omitted, default `.w'
  1080.      
  1081.      ldc[.b] ea,crb                 bcc[.w] pcrel16
  1082.      ldc[.w] ea,sr                  bcc[.b] pcrel8
  1083.      add[:q] sz qim,ea_noimm        bhs[.w] pcrel16
  1084.      add[:g] sz ea,rd               bhs[.b] pcrel8
  1085.      adds sz ea,rd                  bcs[.w] pcrel16
  1086.      addx sz ea,rd                  bcs[.b] pcrel8
  1087.      and sz ea,rd                   blo[.w] pcrel16
  1088.      andc[.b] imm8,crb              blo[.b] pcrel8
  1089.      andc[.w] imm16,sr              bne[.w] pcrel16
  1090.      bpt                            bne[.b] pcrel8
  1091.      bra[.w] pcrel16                beq[.w] pcrel16
  1092.      bra[.b] pcrel8                 beq[.b] pcrel8
  1093.      bt[.w] pcrel16                 bvc[.w] pcrel16
  1094.      bt[.b] pcrel8                  bvc[.b] pcrel8
  1095.      brn[.w] pcrel16                bvs[.w] pcrel16
  1096.      brn[.b] pcrel8                 bvs[.b] pcrel8
  1097.      bf[.w] pcrel16                 bpl[.w] pcrel16
  1098.      bf[.b] pcrel8                  bpl[.b] pcrel8
  1099.      bhi[.w] pcrel16                bmi[.w] pcrel16
  1100.      bhi[.b] pcrel8                 bmi[.b] pcrel8
  1101.      bls[.w] pcrel16                bge[.w] pcrel16
  1102.      bls[.b] pcrel8                 bge[.b] pcrel8
  1103.      
  1104.      blt[.w] pcrel16                mov[:g][.b] imm8,ea_mem
  1105.      blt[.b] pcrel8                 mov[:g][.w] imm16,ea_mem
  1106.      bgt[.w] pcrel16                movfpe[.b] ea,rd
  1107.      bgt[.b] pcrel8                 movtpe[.b] rs,ea_noimm
  1108.      ble[.w] pcrel16                mulxu sz ea,rd
  1109.      ble[.b] pcrel8                 neg sz ea
  1110.      bclr sz imm4,ea_noimm          nop
  1111.      bclr sz rs,ea_noimm            not sz ea
  1112.      bnot sz imm4,ea_noimm          or sz ea,rd
  1113.      bnot sz rs,ea_noimm            orc[.b] imm8,crb
  1114.      bset sz imm4,ea_noimm          orc[.w] imm16,sr
  1115.      bset sz rs,ea_noimm            pjmp abs24
  1116.      bsr[.b] pcrel8                 pjmp @rd
  1117.      bsr[.w] pcrel16                pjsr abs24
  1118.      btst sz imm4,ea_noimm          pjsr @rd
  1119.      btst sz rs,ea_noimm            prtd imm8
  1120.      clr sz ea                      prtd imm16
  1121.      cmp[:e][.b] imm8,rd            prts
  1122.      cmp[:i][.w] imm16,rd           rotl sz ea
  1123.      cmp[:g].b imm8,ea_noimm        rotr sz ea
  1124.      cmp[:g][.w] imm16,ea_noimm     rotxl sz ea
  1125.      Cmp[:g] sz ea,rd               rotxr sz ea
  1126.      dadd rs,rd                     rtd imm8
  1127.      divxu sz ea,rd                 rtd imm16
  1128.      dsub rs,rd                     rts
  1129.      exts[.b] rd                    scb/f rs,pcrel8
  1130.      extu[.b] rd                    scb/ne rs,pcrel8
  1131.      jmp @rd                        scb/eq rs,pcrel8
  1132.      jmp @(imm8,rd)                 shal sz ea
  1133.      jmp @(imm16,rd)                shar sz ea
  1134.      jmp abs16                      shll sz ea
  1135.      jsr @rd                        shlr sz ea
  1136.      jsr @(imm8,rd)                 sleep
  1137.      jsr @(imm16,rd)                stc[.b] crb,ea_noimm
  1138.      jsr abs16                      stc[.w] sr,ea_noimm
  1139.      ldm @sp+,(rlist)               stm (rlist),@-sp
  1140.      link fp,imm8                   sub sz ea,rd
  1141.      link fp,imm16                  subs sz ea,rd
  1142.      mov[:e][.b] imm8,rd            subx sz ea,rd
  1143.      mov[:i][.w] imm16,rd           swap[.b] rd
  1144.      mov[:l][.w] abs8,rd            tas[.b] ea
  1145.      mov[:l].b abs8,rd              trapa imm4
  1146.      mov[:s][.w] rs,abs8            trap/vs
  1147.      mov[:s].b rs,abs8              tst sz ea
  1148.      mov[:f][.w] @(disp8,fp),rd     unlk fp
  1149.      mov[:f][.w] rs,@(disp8,fp)     xch[.w] rs,rd
  1150.      mov[:f].b @(disp8,fp),rd       xor sz ea,rd
  1151.      mov[:f].b rs,@(disp8,fp)       xorc.b imm8,crb
  1152.      mov[:g] sz rs,ea_mem           xorc.w imm16,sr
  1153.      mov[:g] sz ea,rd
  1154.  
  1155. 
  1156. File: as.info,  Node: HPPA-Dependent,  Next: i386-Dependent,  Prev: H8/500-Dependent,  Up: Machine Dependencies
  1157.  
  1158. HPPA Dependent Features
  1159. =======================
  1160.  
  1161. * Menu:
  1162.  
  1163. * HPPA Notes::                Notes
  1164. * HPPA Options::              Options
  1165. * HPPA Syntax::               Syntax
  1166. * HPPA Floating Point::       Floating Point
  1167. * HPPA Directives::           HPPA Machine Directives
  1168. * HPPA Opcodes::              Opcodes
  1169.  
  1170. 
  1171. File: as.info,  Node: HPPA Notes,  Next: HPPA Options,  Up: HPPA-Dependent
  1172.  
  1173. Notes
  1174. -----
  1175.  
  1176.    As a back end for GNU CC `as' has been throughly tested and should
  1177. work extremely well.  We have tested it only minimally on hand written
  1178. assembly code and no one has tested it much on the assembly output from
  1179. the HP compilers.
  1180.  
  1181.    The format of the debugging sections has changed since the original
  1182. `as' port (version 1.3X) was released; therefore, you must rebuild all
  1183. HPPA objects and libraries with the new assembler so that you can debug
  1184. the final executable.
  1185.  
  1186.    The HPPA `as' port generates a small subset of the relocations
  1187. available in the SOM and ELF object file formats.  Additional relocation
  1188. support will be added as it becomes necessary.
  1189.  
  1190. 
  1191. File: as.info,  Node: HPPA Options,  Next: HPPA Syntax,  Prev: HPPA Notes,  Up: HPPA-Dependent
  1192.  
  1193. Options
  1194. -------
  1195.  
  1196.    `as' has no machine-dependent command-line options for the HPPA.
  1197.  
  1198. 
  1199. File: as.info,  Node: HPPA Syntax,  Next: HPPA Floating Point,  Prev: HPPA Options,  Up: HPPA-Dependent
  1200.  
  1201. Syntax
  1202. ------
  1203.  
  1204.    The assembler syntax closely follows the HPPA instruction set
  1205. reference manual; assembler directives and general syntax closely
  1206. follow the HPPA assembly language reference manual, with a few
  1207. noteworthy differences.
  1208.  
  1209.    First, a colon may immediately follow a label definition.  This is
  1210. simply for compatibility with how most assembly language programmers
  1211. write code.
  1212.  
  1213.    Some obscure expression parsing problems may affect hand written
  1214. code which uses the `spop' instructions, or code which makes significant
  1215. use of the `!' line separator.
  1216.  
  1217.    `as' is much less forgiving about missing arguments and other
  1218. similar oversights than the HP assembler.  `as' notifies you of missing
  1219. arguments as syntax errors; this is regarded as a feature, not a bug.
  1220.  
  1221.    Finally, `as' allows you to use an external symbol without
  1222. explicitly importing the symbol.  *Warning:* in the future this will be
  1223. an error for HPPA targets.
  1224.  
  1225.    Special characters for HPPA targets include:
  1226.  
  1227.    `;' is the line comment character.
  1228.  
  1229.    `!' can be used instead of a newline to separate statements.
  1230.  
  1231.    Since `$' has no special meaning, you may use it in symbol names.
  1232.  
  1233. 
  1234. File: as.info,  Node: HPPA Floating Point,  Next: HPPA Directives,  Prev: HPPA Syntax,  Up: HPPA-Dependent
  1235.  
  1236. Floating Point
  1237. --------------
  1238.  
  1239.    The HPPA family uses IEEE floating-point numbers.
  1240.  
  1241. 
  1242. File: as.info,  Node: HPPA Directives,  Next: HPPA Opcodes,  Prev: HPPA Floating Point,  Up: HPPA-Dependent
  1243.  
  1244. HPPA Assembler Directives
  1245. -------------------------
  1246.  
  1247.    `as' for the HPPA supports many additional directives for
  1248. compatibility with the native assembler.  This section describes them
  1249. only briefly.  For detailed information on HPPA-specific assembler
  1250. directives, see `HP9000 Series 800 Assembly Language Reference Manual'
  1251. (HP 92432-90001).
  1252.  
  1253.    `as' does *not* support the following assembler directives described
  1254. in the HP manual:
  1255.  
  1256.      .endm           .liston
  1257.      .enter          .locct
  1258.      .leave          .macro
  1259.      .listoff
  1260.  
  1261.    Beyond those implemented for compatibility, `as' supports one
  1262. additional assembler directive for the HPPA: `.param'.  It conveys
  1263. register argument locations for static functions.  Its syntax closely
  1264. follows the `.export' directive.
  1265.  
  1266.    These are the additional directives in `as' for the HPPA:
  1267.  
  1268. `.block N'
  1269. `.blockz N'
  1270.      Reserve N bytes of storage, and initialize them to zero.
  1271.  
  1272. `.call'
  1273.      Mark the beginning of a procedure call.  Only the special case
  1274.      with *no arguments* is allowed.
  1275.  
  1276. `.callinfo [ PARAM=VALUE, ... ]  [ FLAG, ... ]'
  1277.      Specify a number of parameters and flags that define the
  1278.      environment for a procedure.
  1279.  
  1280.      PARAM may be any of `frame' (frame size), `entry_gr' (end of
  1281.      general register range), `entry_fr' (end of float register range),
  1282.      `entry_sr' (end of space register range).
  1283.  
  1284.      The values for FLAG are `calls' or `caller' (proc has
  1285.      subroutines), `no_calls' (proc does not call subroutines),
  1286.      `save_rp' (preserve return pointer), `save_sp' (proc preserves
  1287.      stack pointer), `no_unwind' (do not unwind this proc), `hpux_int'
  1288.      (proc is interrupt routine).
  1289.  
  1290. `.code'
  1291.      Assemble into the standard section called `$TEXT$', subsection
  1292.      `$CODE$'.
  1293.  
  1294. `.copyright "STRING"'
  1295.      In the SOM object format, insert STRING into the object code,
  1296.      marked as a copyright string.
  1297.  
  1298. `.copyright "STRING"'
  1299.      In the ELF object format, insert STRING into the object code,
  1300.      marked as a version string.
  1301.  
  1302. `.enter'
  1303.      Not yet supported; the assembler rejects programs containing this
  1304.      directive.
  1305.  
  1306. `.entry'
  1307.      Mark the beginning of a procedure.
  1308.  
  1309. `.exit'
  1310.      Mark the end of a procedure.
  1311.  
  1312. `.export NAME [ ,TYP ]  [ ,PARAM=R ]'
  1313.      Make a procedure NAME available to callers.  TYP, if present, must
  1314.      be one of `absolute', `code' (ELF only, not SOM), `data', `entry',
  1315.      `data', `entry', `millicode', `plabel', `pri_prog', or `sec_prog'.
  1316.  
  1317.      PARAM, if present, provides either relocation information for the
  1318.      procedure arguments and result, or a privilege level.  PARAM may be
  1319.      `argwN' (where N ranges from `0' to `3', and indicates one of four
  1320.      one-word arguments); `rtnval' (the procedure's result); or
  1321.      `priv_lev' (privilege level).  For arguments or the result, R
  1322.      specifies how to relocate, and must be one of `no' (not
  1323.      relocatable), `gr' (argument is in general register), `fr' (in
  1324.      floating point register), or `fu' (upper half of float register).
  1325.      For `priv_lev', R is an integer.
  1326.  
  1327. `.half N'
  1328.      Define a two-byte integer constant N; synonym for the portable
  1329.      `as' directive `.short'.
  1330.  
  1331. `.import NAME [ ,TYP ]'
  1332.      Converse of `.export'; make a procedure available to call.  The
  1333.      arguments use the same conventions as the first two arguments for
  1334.      `.export'.
  1335.  
  1336. `.label NAME'
  1337.      Define NAME as a label for the current assembly location.
  1338.  
  1339. `.leave'
  1340.      Not yet supported; the assembler rejects programs containing this
  1341.      directive.
  1342.  
  1343. `.origin LC'
  1344.      Advance location counter to LC. Synonym for the `{No Value For
  1345.      "as"}' portable directive `.org'.
  1346.  
  1347. `.param NAME [ ,TYP ]  [ ,PARAM=R ]'
  1348.      Similar to `.export', but used for static procedures.
  1349.  
  1350. `.proc'
  1351.      Use preceding the first statement of a procedure.
  1352.  
  1353. `.procend'
  1354.      Use following the last statement of a procedure.
  1355.  
  1356. `LABEL .reg EXPR'
  1357.      Synonym for `.equ'; define LABEL with the absolute expression EXPR
  1358.      as its value.
  1359.  
  1360. `.space SECNAME [ ,PARAMS ]'
  1361.      Switch to section SECNAME, creating a new section by that name if
  1362.      necessary.  You may only use PARAMS when creating a new section,
  1363.      not when switching to an existing one.  SECNAME may identify a
  1364.      section by number rather than by name.
  1365.  
  1366.      If specified, the list PARAMS declares attributes of the section,
  1367.      identified by keywords.  The keywords recognized are `spnum=EXP'
  1368.      (identify this section by the number EXP, an absolute expression),
  1369.      `sort=EXP' (order sections according to this sort key when linking;
  1370.      EXP is an absolute expression), `unloadable' (section contains no
  1371.      loadable data), `notdefined' (this section defined elsewhere), and
  1372.      `private' (data in this section not available to other programs).
  1373.  
  1374. `.spnum SECNAM'
  1375.      Allocate four bytes of storage, and initialize them with the
  1376.      section number of the section named SECNAM.  (You can define the
  1377.      section number with the HPPA `.space' directive.)
  1378.  
  1379. `.string "STR"'
  1380.      Copy the characters in the string STR to the object file.  *Note
  1381.      Strings: Strings, for information on escape sequences you can use
  1382.      in `as' strings.
  1383.  
  1384.      *Warning!* The HPPA version of `.string' differs from the usual
  1385.      `as' definition: it does *not* write a zero byte after copying STR.
  1386.  
  1387. `.stringz "STR"'
  1388.      Like `.string', but appends a zero byte after copying STR to object
  1389.      file.
  1390.  
  1391. `.subspa NAME [ ,PARAMS ]'
  1392. `.nsubspa NAME [ ,PARAMS ]'
  1393.      Similar to `.space', but selects a subsection NAME within the
  1394.      current section.  You may only specify PARAMS when you create a
  1395.      subsection (in the first instance of `.subspa' for this NAME).
  1396.  
  1397.      If specified, the list PARAMS declares attributes of the
  1398.      subsection, identified by keywords.  The keywords recognized are
  1399.      `quad=EXPR' ("quadrant" for this subsection), `align=EXPR'
  1400.      (alignment for beginning of this subsection; a power of two),
  1401.      `access=EXPR' (value for "access rights" field), `sort=EXPR'
  1402.      (sorting order for this subspace in link), `code_only' (subsection
  1403.      contains only code), `unloadable' (subsection cannot be loaded
  1404.      into memory), `common' (subsection is common block), `dup_comm'
  1405.      (initialized data may have duplicate names), or `zero' (subsection
  1406.      is all zeros, do not write in object file).
  1407.  
  1408.      `.nsubspa' always creates a new subspace with the given name, even
  1409.      if one with the same name already exists.
  1410.  
  1411. `.version "STR"'
  1412.      Write STR as version identifier in object code.
  1413.  
  1414. 
  1415. File: as.info,  Node: HPPA Opcodes,  Prev: HPPA Directives,  Up: HPPA-Dependent
  1416.  
  1417. Opcodes
  1418. -------
  1419.  
  1420.    For detailed information on the HPPA machine instruction set, see
  1421. `PA-RISC Architecture and Instruction Set Reference Manual' (HP
  1422. 09740-90039).
  1423.  
  1424. 
  1425. File: as.info,  Node: i386-Dependent,  Next: i960-Dependent,  Prev: HPPA-Dependent,  Up: Machine Dependencies
  1426.  
  1427. 80386 Dependent Features
  1428. ========================
  1429.  
  1430. * Menu:
  1431.  
  1432. * i386-Options::                Options
  1433. * i386-Syntax::                 AT&T Syntax versus Intel Syntax
  1434. * i386-Opcodes::                Opcode Naming
  1435. * i386-Regs::                   Register Naming
  1436. * i386-prefixes::               Opcode Prefixes
  1437. * i386-Memory::                 Memory References
  1438. * i386-jumps::                  Handling of Jump Instructions
  1439. * i386-Float::                  Floating Point
  1440. * i386-16bit::                  Writing 16-bit Code
  1441. * i386-Notes::                  Notes
  1442.  
  1443. 
  1444. File: as.info,  Node: i386-Options,  Next: i386-Syntax,  Up: i386-Dependent
  1445.  
  1446. Options
  1447. -------
  1448.  
  1449.    The 80386 has no machine dependent options.
  1450.  
  1451.